return atoms;
}
-/**
- * gtk_target_table_new_from_list:
- * @list: a #GtkTargetList
- * @n_targets: (out): return location for the number ot targets in the table
- *
- * This function creates an #GtkTargetEntry array that contains the
- * same targets as the passed %list. The returned table is newly
- * allocated and should be freed using gtk_target_table_free() when no
- * longer needed.
- *
- * Returns: (array length=n_targets) (transfer full): the new table.
- *
- * Since: 2.10
- **/
-GtkTargetEntry *
-gtk_target_table_new_from_list (GtkTargetList *list,
- gint *n_targets)
-{
- GtkTargetEntry *targets;
- GList *tmp_list;
- gint i;
-
- g_return_val_if_fail (list != NULL, NULL);
- g_return_val_if_fail (n_targets != NULL, NULL);
-
- *n_targets = g_list_length (list->list);
- targets = g_new0 (GtkTargetEntry, *n_targets);
-
- for (tmp_list = list->list, i = 0; tmp_list; tmp_list = tmp_list->next, i++)
- {
- GtkTargetPair *pair = tmp_list->data;
-
- targets[i].target = gdk_atom_name (pair->target);
- targets[i].flags = pair->flags;
- targets[i].info = pair->info;
- }
-
- return targets;
-}
-
-/**
- * gtk_target_table_free:
- * @targets: (array length=n_targets): a #GtkTargetEntry array
- * @n_targets: the number of entries in the array
- *
- * This function frees a target table as returned by
- * gtk_target_table_new_from_list()
- *
- * Since: 2.10
- **/
-void
-gtk_target_table_free (GtkTargetEntry *targets,
- gint n_targets)
-{
- gint i;
-
- g_return_if_fail (targets == NULL || n_targets > 0);
-
- for (i = 0; i < n_targets; i++)
- g_free (targets[i].target);
-
- g_free (targets);
-}
-
/**
* gtk_selection_owner_set_for_display:
* @display: the #GdkDisplay where the selection is set